package com.hp.bon.sgw.domain;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 开放的，允许外部网元（NE)访问的业务能力
 * 
 * @author wuzhih
 * 
 */
@Entity
@Table(name = "T_CAPABILITY_OPENED")
public class OpenedCapability {

	public static final int CONTROL_NONE = 0;
	public static final int CONTROL_BY_COUNT = 1;
	public static final int CONTROL_BY_FLUX = 2;
	public static final int CONTROL_BOTH = 3;

	private int id;
	private String capability;
	private int nodeId;
	// private String userName;// 可细化到用户级
	private int priority;// 优先级
	private int timeoutDropMsg;// CCA超时丢弃时间,CCA超时

	private int fcontrolCycle;// 流控周期,单位S
	private int fcontrolReconInterval;// 断链恢复时间间隔,单位S
	private int countWarning;// 次数告警阀值
	private int countDisconnect;// 次数断链阀值
	private int fluxWarning;// 流量大小告警阀值
	private int fluxDisconnect;// 流量大小断链阀值
	private int controlType = CONTROL_NONE;
	private Date modifiedTime;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getNodeId() {
		return nodeId;
	}

	public void setNodeId(int nodeId) {
		this.nodeId = nodeId;
	}

	public String getCapability() {
		return capability;
	}

	public void setCapability(String capability) {
		this.capability = capability;
	}

	public int getFcontrolCycle() {
		return fcontrolCycle;
	}

	public void setFcontrolCycle(int fcontrolCycle) {
		this.fcontrolCycle = fcontrolCycle;
	}

	public int getFcontrolReconInterval() {
		return fcontrolReconInterval;
	}

	public void setFcontrolReconInterval(int fcontrolReconInterval) {
		this.fcontrolReconInterval = fcontrolReconInterval;
	}

	public int getCountWarning() {
		return countWarning;
	}

	public void setCountWarning(int countWarning) {
		this.countWarning = countWarning;
	}

	public int getCountDisconnect() {
		return countDisconnect;
	}

	public void setCountDisconnect(int countDisconnect) {
		this.countDisconnect = countDisconnect;
	}

	public int getFluxWarning() {
		return fluxWarning;
	}

	public void setFluxWarning(int fluxWarning) {
		this.fluxWarning = fluxWarning;
	}

	public int getFluxDisconnect() {
		return fluxDisconnect;
	}

	public void setFluxDisconnect(int fluxDisconnect) {
		this.fluxDisconnect = fluxDisconnect;
	}

	public int getControlType() {
		return controlType;
	}

	public void setControlType(int controlType) {
		this.controlType = controlType;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public Date getModifiedTime() {
		return modifiedTime;
	}

	public void setModifiedTime(Date modifiedTime) {
		this.modifiedTime = modifiedTime;
	}

	public int getTimeoutDropMsg() {
		return timeoutDropMsg;
	}

	public void setTimeoutDropMsg(int timeoutDropMsg) {
		this.timeoutDropMsg = timeoutDropMsg;
	}

}
